package P6.T03;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

public class DrawAction implements ActionListener {
    private JMyFrame f;
    public DrawAction(JMyFrame jMyFrame) {
        f=jMyFrame;
    }

    @Override
    public void actionPerformed(ActionEvent e) {
        Graphics2D g=(Graphics2D) f.getGraphics();
        g.drawLine(20,100,100,200);
    }
}
